<div class="page-header">
  <h1>Listagem <small>Bancos</small></h1>
</div>

<ul class="breadcrumb">
  <li><a href="<?php echo $this->baseUrl() ?>/index">Home</a> <span class="divider">/</span></li>
  <li class="active">Listar Bancos</li>
</ul>

<?php if (!empty($this->msg)): ?>
<div class="alert alert-success alert-dismissable">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  <?php echo $this->msg; ?>
</div>
<?php endif; ?> 

<table class="table table-hover">
    <thead>
    <th>#</th>
    <th></th>
    <th>Nome</th>
    <th></th>
    </thead>
    <tbody>
        <?php foreach ($this->bancos as $banco): ?>
        <tr>
            <td><?php echo $banco->id ?></td>
            <td>
                <?php if ($banco->status_banco == Status::BLOQUEADO): ?>
                <a href="<?php echo $this->baseUrl() ?>/banco/ajax-bloquear/id/<?php echo $banco->id ?>" ><i class="icon-ban-circle icon" data-toggle="tooltip" title="Banco Bloqueado, clique para Desbloquear"></i></a>
                <?php else: ?>
                <a href="<?php echo $this->baseUrl() ?>/banco/ajax-bloquear/id/<?php echo $banco->id ?>" ><i class="icon-ok icon" data-toggle="tooltip" title="Banco Desbloqueado, clique para Bloquear"></i></a>                
                <?php endif; ?>
            </td>
            <td><?php echo $banco->nome ?></td>
            <td><a href="#modal-editar-banco-<?php echo $banco->id?>" role="button" data-toggle="modal"><i class="icon-edit" data-toggle="tooltip" title="Editar"></i></a>
        </tr>
        <?php echo $this->partial('partials/editar-banco.phtml', array('banco' => $banco)); ?> 
        <?php endforeach; ?>
       
    </tbody>
</table>